#ifndef __ULCORE_SERIAL_H__
#define __ULCORE_SERIAL_H__

#include <string>
#include <list>
#include "ULCore_Balls.h"

struct hitsAndPrize{
	int hits; //How many winners
	int prize; //How much money
};

#define EXTRA_DATA_SIZE	2
#define DATE_ALIGN_SIZE	16

class ULC_Serial{
public:
	int sn;
	char date[DATE_ALIGN_SIZE];
	ULC_Balls sortedBalls;
	ULC_Balls actualOutBalls;
	int extraData[EXTRA_DATA_SIZE]; //Don't know yet
	struct hitsAndPrize top;
	struct hitsAndPrize second;
	struct hitsAndPrize third;
	struct hitsAndPrize fourth;
	struct hitsAndPrize fifth;
	struct hitsAndPrize sixth;
public:
	ULC_Serial *repeatedRoot; //Root node of repeated serials
	ULC_Serial *nextRepeatedSerial; //Next serial with the same numbers
public:
	ULC_Serial();
	int ParseLineBuffer(const char *lineBuffer); //Setup ULC_Serial's members according to lineBuffer(Format of lineBuffer is shown in history data file)
	friend ostream& operator<<(ostream &os, const ULC_Serial &serial);
};

#endif /*__ULCORE_SERIAL_H__*/
